package com.example.jpatest.service;

import com.example.jpatest.entity.Enter;
import com.example.jpatest.entity.Teacher;
import com.example.jpatest.entity.Team;
import com.example.jpatest.entity.TeamTeacher;
import java.util.Set;
import java.util.List;

/**
 * @author czx
 */
public interface TeacherService {
    /**
     * 保存老师
     * @param teacher 老师信息
     */
    void saveTeacher(Teacher teacher);

    /**
     * 根据工号查询老师
     * @param id 工号
     * @return 老师信息
     */
    Teacher getById(Long id);

    /**
     * 获得所有老师信息
     * @return 老师信息
     */
    List<Teacher> getTeachers();

    /**
     * 删除老师
     * @param teacher 工号
     */
    void deleteTeacher(Teacher teacher);

    /**
     * 老师加入队伍
     * @param teacher 老师信息
     * @param team 队伍信息
     * @param teacherLevel 老师等级
     */
    void joinTeam(Teacher teacher, Team team, TeamTeacher.TeacherLevel teacherLevel);

    /**
     * 老师退出队伍
     * @param teacher 老师信息
     * @param team 队伍信息
     */
    void quitTeam(Teacher teacher,Team team);

    /**
     * 老师是否在队内
     * @param teacher 老师信息
     * @param team 队伍信息
     * @return 是否入队
     */
    boolean isInTeam(Teacher teacher, Team team);

    /**
     * 获得老师所在的队伍
     * @param teacher 老师信息
     * @return 队伍信息
     */
    List<Team> getTeams(Teacher teacher);

    /**
     * 获得老师在队伍的等级
     * @param teacher 老师信息
     * @param team 队伍信息
     * @return 老师级别
     */
    TeamTeacher.TeacherLevel getTeacherLevel(Teacher teacher,Team team);

    /**
     * 获得老师的所有报名
     * @param teacher 老师
     * @return 报名信息
     */
    List<Enter> getEnters(Teacher teacher);
}
